import request from "@/utils/request";

// 用户登录
export const register = (data) => {
  return request({
    url: "/user/regist",
    method: "POST",
    data,
  });
};

export const sendCode = (data) => {
  return request({
    url: "/user/sendCode",
    method: "POST",
    data,
  });
};
//登录
export const login = (data) => {
  return request({
    url: "/user/login",
    method: "POST",
    data,
  });
};

//获取用户信息
export const getUserInfo = () => {
  return request({
    url: "/index/getUser",
    method: "GET",
  });
};
